perm filename ELLEN.MSG[PUB,TES] blob sn#226971 filedate 1976-07-15 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	The following PUB macro, under, takes a string as an argument and inserts
C00004 ENDMK
C⊗;
The following PUB macro, under, takes a string as an argument and inserts
"∪", the PUB single word underline character in front of each word.  You may
have to change the ←'s to _'s for the macro to work at MIT but the macro does
work.  I don't expect that you will use it but a simple macro will work.  By
the way; there was not a bug in PUB, but a stupid error in my use of scan.
The "ia" argument to scan was originally "a" which was incorrect.


.variable txt, token, space;
.
.space←'40;
.
.macro under(stuff)⊂
.    turn on "∪"; txt ← "stuff";
.    repeat⊂
.	if txt=null then done else token ← scan(txt, space, null, "ia");
.	if token=space then token else ("∪"&token); ⊃
.    turn off; ⊃
.
.under "Good grief, Charly    Brown!"